<!-- 导航条
================================================== -->

<nav class="navbar navbar-default" role="navigation" style="margin-bottom: 0px;">

    <div class="container" style='padding: 30px 0 30px 0;'>
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">            
            <a class="navbar-brand" href="#" style="margin-top: -15px;"><img alt="Brand" width="250" height="50" src="__IMG__/hlogo.png"/></a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">

                <think:nav name="nav">
                    <eq name="nav.pid" value="0">
                    <li>
                        <a href="{$nav.url|get_nav_url}" target="<eq name='nav.target' value='1'>_blank<else/>_self</eq>">{$nav.title}</a>
                    </li>
                    </eq>
                </think:nav>              
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">常见问题 <span class="caret"></span></a>
                    <ul class="dropdown-menu" role="menu">
                      <!--  <li><a href="#">联系客服</a></li>
                        <li class="divider"></li>-->
                          {:W('Category/lists', array(1, true))} 
                    </ul>
                </li>
            </ul>

            <ul class="nav navbar-nav navbar-right">
                <if condition="is_login()">                   
                     <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown"> <span class="glyphicon glyphicon-th-list"></span> 控制中心 <span class="caret"></span></a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="{:U('Center/index')}">预报管理</a></li>                           
                            <li><a href="{:U('Center/warehouse','CID=-1')}">仓库管理</a></li>
                            <li><a href="{:U('Center/order')}">订单管理</a></li>
                        </ul>
                    </li>
                    
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown"> <span class="glyphicon glyphicon-user"></span> {:get_username()}  <span class="caret"></span></a>
                        <ul class="dropdown-menu" role="menu">
                             <li><a href="{:U('Center/accountdetail')}">财务明细</a></li>
                             <li><a href="{:U('Center/myaddress')}">国内地址</a></li>
                            <li><a href="{:U('User/profile')}">修改密码</a></li>                          
                            <li class="divider"></li>
                            <li><a href="{:U('User/logout')}">退出</a></li>
                        </ul>
                    </li>
                    <else/>
                    <li><a href="{:U('User/login')}">登录</a></li>
                    <li><a href="{:U('User/register')}" style="padding-left:0;padding-right:0">注册</a></li>
                </if>
            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->

</nav>
